<?php

namespace App\Http\Controllers\YApi;

//use Illuminate\Http\Request;
use Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use Session;
use Redirect;

use App\Models\UsersReg;
use App\Models\UsersFollow;

class FensiController extends Controller
{

  	public function fensi($uid)
  	{
		// 获得粉丝
		$guanzhus = UsersFollow::where('friend_uid', $uid)->get();


		foreach($guanzhus as $guanzhu)
		{
			$guanzhu['users'] = UsersReg::find($guanzhu->fans_uid);
			$listusers['listusers'] = $guanzhus;
		}

		$listusers['count'] = $guanzhus->count();

		return $listusers;
    }
    
}